/*
 * @Descripttion:
 * @Author: Silence
 * @Date: 2023-06-09 19:24:53
 * @LastEditors: Silence
 * @LastEditTime: 2023-06-11 22:13:08
 */
import request from '@/utils/request.js'
export const getrgoodsApi = (data) => {
  return request.get('/goods', { params: data })
}
export const getclassfiyApi = () => {
  return request.get('/categories')
}
export const getparamsApi = (id, data) => {
  return request.get(`/categories/${id}/attributes`, { params: data })
}
export const addparamsApi = (id, data) => {
  return request.post(`/categories/${id}/attributes`, data)
}
export const delrgoodsApi = (id) => {
  return request.delete('/goods/' + id)
}
export const changeparamsApi = (id, rid, data) => {
  return request.put(`/categories/${id}/attributes/${rid}`, data)
}
export const delparamsApi = (id, rid) => {
  return request.delete(`/categories/${id}/attributes/${rid}`)
}
export const addgoodsApi = (data) => {
  return request.post('/goods', data)
}
export const getcategoriesApi = (data) => {
  return request.get('/categories', { params: data })
}
export const addcategoriesApi = (data) => {
  return request.post('/categories', data)
}
